<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Admin: <%= controller.action_name %></title>
    <%= stylesheet_link_tag "scaffold" %>
    <%= stylesheet_link_tag "admin" %>
	<%= javascript_include_tag "prototype" %>
</head>
<body>
    <% if session[:logged_in] -%>
    <ul id="topmenu">
        <li><%= link_to("Reports", {:controller => "/admin", :action => "index"}, {:accesskey => "1"}) %></li>
        <li><%= link_to("Orders", {:controller => "admin/orders", :action => "index"}, {:accesskey => "2"}) %></li>
        <li><%= link_to("Add Order", {:controller => "admin/orders", :action => "new"}, {:accesskey => "3"}) %></li>
        <li><%= link_to("Add Coupons", {:controller => "/admin", :action => "generate_coupons"}, {:accesskey => "4"}) %></li>
        <li><%= link_to("Products", {:controller => "admin/products", :action => "index"}, {:accesskey => "5"}) %></li>
        <li id="search">
            <% form_tag({:controller => "admin/orders", :action => "index"}, {:method => "GET"}) do -%>
            <%= text_field_tag("query", nil, {:accesskey => "F"}) %>
            <%= submit_tag "Search" %>
            <% end -%>
        </li>
    </ul>
    <% end -%>
    <p style="color: green"><%= flash[:notice] %></p>
    <p style="color: red"><%= flash[:error] %></p>

    <%= @content_for_layout %>
</body>
</html>
